package org.jeecg.modules.power.group.entity;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * BD小组关系实体类
 *
 * @author scw
 * @version v1.0
 * @date
 */
@Data
public class GroupUser  implements Serializable {

    private static final long serialVersionUID = 1L;

    private String userId;
    private String userName;
    @ApiModelProperty("小组ID")
    private String groupId;
    @ApiModelProperty("小组名称")
    private String groupName;
    @ApiModelProperty("当前用户是否组长")
    private String isLeader;
    private String status;
    private String mobile;
    /**
     * 如果是组长，应该有对应小组的成员
     */
    @ApiModelProperty("小组成员信息（包含组长）")
    private List<JSONObject> groupUserList;

    public String getUserInfo(){
        return String.format("%s | %s | %s",this.groupName,this.userName,this.mobile);
    }

}
